﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
 
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;

namespace Demo
{
    public partial class Undo : DemoBaseUserControl
    {
        public Undo()
        {
            InitializeComponent();
            this.Title = "撤消和重做";
            this.Description = "Spread .NET  提供“撤消”和“重做”功能，快捷键分别为 “Ctrl + Z”和 “Ctrl + Y”。";
        }

        private void Undo_Load_1(object sender, EventArgs e)
        {
            FpSpread1.DataSource = 销售明细表TableAdapter.GetData();
            FpSpread1.AllowColumnMove = true;
            FpSpread1.ActiveSheet.Columns[1].AllowAutoSort = true;
            FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always;
            FpSpread1.TabStrip.Editable = true;
            FpSpread1.ActiveSheet.AllowGroup = true;
            FpSpread1.AllowColumnMove = true;
            FpSpread1.ActiveSheet.GroupBarVisible = true;

        }

        private void button6_Click(object sender, System.EventArgs e)
        {
            FpSpread1.UndoManager.Undo();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            FpSpread1.UndoManager.Redo();
        }


    }
}
